package com.ltmall.api.manager;

import com.ltmall.api.bean.*;
import com.ltmall.api.enums.DirectSupplyAreaTypeEnum;
import com.ltmall.api.util.PageUtil;

import java.util.List;

/**
 * 小区直供Manager
 *
 * @author dou.guo
 * @Title DirectSupplyManager.java
 * @Description 类DirectSupplyManager.java的实现描述：类实现描述 
 * @date 2017年10月9日 下午5:52:18
 * @package com.ltmall.api.manager
 */
public interface DirectSupplyManager {

    //*************************小区详情服务*************************
    /**获取当前区域下开通直供的子级区域*/
    public List<ThDirectSupply> getOpenedArea(String curAreaName, DirectSupplyAreaTypeEnum areaType);

    List<ThDirectSupply> directSupplyPage(final PageUtil page);

    public boolean updateDirectSupplyState(int id, int state);

    /**开通社区直供 */
    public boolean openDirectSupply(ThDirectSupply order);

    /**获取所有开通直供的小区*/
    public List<ThDirectSupply> getDirectSupplyList();

    public ThDirectSupply getDirectSupplyById(String id);

    public List<ThDirectSupply> getDirectSupplyByShopId(String shopId);

    public boolean updateDirectSupply(ThDirectSupply directSupply);

    public List<ThDirectSupply> getDirectSupplyListByName(String area, String areaName);

    /**获取附近的小区*/
    public List<ThDirectSupply> getNearbyBlock(double maxLat, double minLat, double maxLng,
                                               double minLng);

    //*************************小区banner服务*************************
    public List<ThGroupBanners> getGroupBannersList(int directSupplyId, int state);

    public List<ThGroupBanners> getGroupBannersListByDirctId(int shopId, int dirctId);

    public ThGroupBanners getGroupBanners(int id);

    public boolean addGroupBanners(ThGroupBanners banners);

    public boolean updateGroupBanners(ThGroupBanners banners);

    public boolean deleteGroupBanners(int id);

    public List<ThGroupBanners> groupBannersPage(final PageUtil page);

    public boolean updateGroupBannersState(int id, int state);

    //*************************小区团购公告服务*************************
    public List<ThGroupBroadcast> getGroupBroadcastList(int directSupplyId, int state);

    public List<ThGroupBroadcast> getGroupBroadcastList(int shopId, String directId);

    public ThGroupBroadcast getGroupBroadcast(int id);

    public boolean addGroupBroadcast(ThGroupBroadcast groupBroadcast);

    public boolean updateGroupBroadcast(ThGroupBroadcast groupBroadcast);

    public boolean deleteGroupBroadcast(int id);

    public List<ThGroupBroadcast> groupBroadcastPage(final PageUtil page);

    public boolean updateGroupBroadcastState(int id, int state);

    //*************************小区团购个性化设置服务*************************
    public ThGroupPersonalSetting getGroupPersonalSetting(int shopId, String directId);

    public boolean addGroupPersonalSetting(ThGroupPersonalSetting groupPersonalSetting);

    public boolean updateGroupPersonalSetting(ThGroupPersonalSetting groupPersonalSetting);

    public List<ThGroupPersonalSetting> groupPersonalSettingPage(final PageUtil page);

    public boolean updateGroupPersonalSettingState(int id, int state);

    public ThGroupPersonalSetting getGroupPersonalSettingByState(int directSupplyId, int state);

    //*************************小区自提信息服务*************************
    public boolean saveGroupDeliveryInfo(ThGroupDeliveryAddr deliveryAddr);

    public boolean updateGroupDeliveryInfo(int id, String name, String phone, String address);

    public ThGroupDeliveryAddr getGroupDeliveryInfo(String userId, String directId);

    public ThGroupDeliveryAddr getGroupDeliveryInfoById(int id);
}
